import React, { Component } from 'react'
import { Switch, Route, Redirect } from 'react-router-dom'
import Home from './home/Home'
import UserList from './user-manage/UserList'
import RouteList from './right-manage/RoleList'
import RightList from './right-manage/Right.list'
import NotPermission from '../NotPermission/NotPermission'
import { Layout, Menu} from 'antd';
import SideMenu from '../../components/sandbox/SideMenu'
import TopHeader from '../../components/sandbox/TopHeader'
// 新闻列表
import Draftbox from './news-mannage/Draftbox'
import Editnews from './news-mannage/Editnews'
import Newsclassification from './news-mannage/Newsclassification'
// 审核
import Auditnews from './to-examine/Auditnews'
import Auditlist from './to-examine/Auditlist'
import './NewsSandBox.css'
const { Header, Content, Footer, Sider } = Layout;

export default class NewsSandBox extends Component {
  render() {
    return (
      <Layout>
        <SideMenu></SideMenu>
        <Layout>
          <TopHeader></TopHeader>
          <Content style={{ margin: '24px 16px 0' }}>
              <Switch>
                <Route path='/home' component={Home}></Route>
                <Route path='/user-manage/list' component={UserList}></Route>
                <Route path='/right-manage/role/list' component={RouteList}></Route>
                <Route path='/right-manage/right/list' component={RightList}></Route>
                <Route path='/news-mannage/Draftbox/list' component={Draftbox}></Route>
                <Route path='/news-mannage/Editnews/list' component={Editnews}></Route>
                <Route path='/news-mannage/Newsclass/list' component={Newsclassification}></Route>
                <Route path='/to-examine/Auditlist' component={Auditlist}></Route>
                <Route path='/to-examine/Auditnews' component={Auditnews}></Route>

                <Redirect from="/" to="/home" exact></Redirect>
                <Route path="*" component={NotPermission}></Route>
              </Switch>
          </Content>

        </Layout>
      </Layout>
    )
  }
}
